#include <gwbase/base/daemon.h>
#include <gwbase/base/logging.h>

#include <boost/bind.hpp>

using namespace dicom;

int service(int argc, char** argv) {
  dicom::SetRollingFileLogging(".", "daemon");

  for (;;) {
    LOG_INFO << "Message";
    ::sleep(1);
  }

  return 0;
}

int main(int argc, char** argv) 
{
  // return service(argc, argv);
  Daemon daemon(boost::bind(&service, _1, _2));
  return daemon.Run(argc, argv);
}
